package simplelab;

import java.awt.Point;

public class Food {

    public static int classIDInc = 0;
    public int ID;
    public int value;
    public Position position;
    public boolean isInTask;
    public int ownerID; //annak az ágensnek a neve amely fel fogja venni az ételt

    public Food(int value, Position position) {
        this.ID = (++classIDInc);
        this.value = value;
        this.position = position;
        this.isInTask = false;
        this.ownerID = -1; // nincs tulajdonosa
    }
    public void changeOwner(int ID){
        this.ownerID = ID;
    }

    public void RefreshIntel(int value) {
        this.value = value;
    }

    public int GetEatTime() {
        return (int) Math.round((double) value
                / (double) (World.foodLostPerTurn + World.maxEatPerTurn));
    }

    @Override
    public String toString() {
        return "Food{" + "ID=" + ID + ", value=" + value + ", position=" + position + ", isInTask=" + isInTask + ", ownerID=" + ownerID + '}';
    }
    
    
    
}